Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Zach Lopresterakol 10.Nov.03 07:22 PM a Web browser
Domino Server 6.0.1 Windows 2000


Hi:
BACKGROUND:
I have a LS agent that calls a batch file.
PROBLEM:
When this batch file is called it calls the agent in the console window rather than an external DOS window.
SOLUTION?
Can you explain this as it is causing problems as I want the agent to wait until the external window looses focus and then continues.


Here is my code for the agent to wait until the batch file cmd screen looses focus:

RunApp:
Sub RunApp (program$)
structure:
start.cb = Len(start)
ret& = CreateProcessA(0&, program$, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)
ret& = WaitForSingleObject(proc.hProcess, INFINITE)
ret& = CloseHandle(proc.hProcess)
End Sub

Initilaze:

'Execute java
Print ( " ")
Print(" *********** Date greater - running java extractor. ***************** ")

'Set current directory using UNC path so extractor can be run from clients
Chdrive "c"
Chdir "c:\utils\doti\extractor\src"
' taskId% = Shell("extractor.bat", 1)
Print " ******* Extractor Opened *********"
RunApp("c:\utils\doti\extractor\src\extractor.bat")
Print " ******* Extractor Closed *********"
qryediflag.SQL = "DELETE FROM XML_FLAG"
resultediflag.Execute
'Vaildation of xml document is performed from extractor program. Therefore the xml file is not created is not valid.

Print " ********** XML FILE Successfully Generated ******* "
End If

Any ideas would be greatly appreciated.

james






REPOST: Batch file runs inside Serv... (~Zach Loprester... 10.Nov.03)
. . RE: REPOST: Batch file runs inside ... (~Emile Zennulit... 10.Nov.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS